package com.nwpu.coursesupport.mapper;

import com.nwpu.coursesupport.criteria.TaskSearchCriteria;
import com.nwpu.coursesupport.entity.Task;
import com.nwpu.coursesupport.view.GradeRateItem;
import com.nwpu.coursesupport.view.criteria.UpdateGradeStatusSearchCriteria;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface TaskMapper extends BaseMapper<Task>{
	public boolean updateAttachment(Task p);

    public boolean updateAnswerAttachment(Task p);

    public boolean updateQuote(Task p);

    public List<Task> findByIds(List<Integer> list);
    public boolean updateGradeStatus(UpdateGradeStatusSearchCriteria sc);

    public boolean updateGrade(UpdateGradeStatusSearchCriteria sc);

    public List<GradeRateItem> gradeRateView(TaskSearchCriteria sc);

    public List<Task> findAssignTaskByCourseId(TaskSearchCriteria sc);

    public int coutAssignTaskByCourseId(TaskSearchCriteria sc);

    public Task findById1(@Param("id") Integer id);
}
